package com.tuanzi.loan.business.service.xhh.settlementsystem;

import com.tuanzi.loan.business.entity.family.ProductInfo;
import com.tuanzi.loan.business.entity.xhh.settlementsystem.XhhSettlementIncome;
import com.tuanzi.loan.core.service.BaseAuditService;
import com.tuanzi.loan.core.vo.PageSearcher;
import com.tuanzi.loan.vo.request.xhh.settlementsystem.XhhSettlementIncomeRequest;
import com.tuanzi.loan.vo.response.xhh.settlementsystem.XhhSettlementIncomeResponse;
import org.springframework.data.domain.Page;

import java.util.List;

/**
 * @author caiwanlin
 * @create 2018-08-20 13:53
 */
public interface XhhSettlementIncomeService extends BaseAuditService<XhhSettlementIncome, Long> {
	Page<XhhSettlementIncomeResponse> list(PageSearcher<XhhSettlementIncomeRequest> pageSearcher);

	void onSave(XhhSettlementIncome settlementIncome, List<ProductInfo> activityList, List<Long> selectActivityIdList, Boolean isSpecialChannel);

	List<XhhSettlementIncome> findAllByBillId(Long billId);

	void updateCompanyNameByCompanyId(Long companyId, String companyName);

	void updateProductNameByProductId(Long productId, String productName);

	void updateCompanyIdAndCompanyNameByCompanyId(Long companyId, String companyName, Long newCompanyId);

	void deleteByCompanyId(Long companyId);

	void deleteByProductId(Long productId);

	void onDelete(Long incomeId);

	List<XhhSettlementIncome> findAllByProductId(Long productId);

	Double sumRangeTotalAmount(XhhSettlementIncomeRequest request);

	Double sumRangeTotalUvValue(XhhSettlementIncomeRequest request);

}
